package com.qd.common.panda.domain.entity.carpark;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 停车场开启关闭日志
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class CarParkLogDTO extends BaseQuery {

    /**
     * 主键
     */
    @Size(max = 50, message = "日志ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String logId;
    /**
     * 停车场名称
     */
    @Size(max = 100, message = "停车场名称长度不能超过{max}位", groups = DefaultGroup.class)
    private String name;
    /**
     * 操作时间
     */
    private LocalDateTime operatorTime;
    /**
     * 停车场
     */
    @NotBlank(message = "停车场不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "停车场长度不能超过{max}位", groups = DefaultGroup.class)
    private String parkId;
    /**
     * 操作人
     */
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 机构ID
     */
    @Size(max = 50, message = "机构ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orgId;
    /**
     * 类型
     */
    private Integer type;
    /**
     * 说明
     */
    @Size(max = 200, message = "是否启用长度不能超过{max}位", groups = DefaultGroup.class)
    private String note;
    /**
     * 是否启用
     */
    private String enable;

    @Override
    public void freeData() {
        this.logId = null;
        this.name = null;
        this.operatorTime = null;
        this.parkId = null;
        this.operator = null;
        this.orgId = null;
        this.type = null;
        this.note = null;
        this.enable = null;
        super.freeData();
    }
}
